import React,{Component} from 'react';

import {View,StyleSheet,ScrollView,Text,TouchableOpacity} from 'react-native';

import {
    Header,
    Banner,
    Hot,
    ListContent
} from './home/index';

//首页容器
import { request,apiStore,configure } from '../service/api';
class HomeScreen extends Component {
    static navigationOptions = {title:'首页'};

    constructor(props){
        super(props);
    }


  render(){
    const {navigate}=this.props.navigation;
    return(
        <View style={styles.container}>

            <Header/>

            <ScrollView >

                <Banner/>

                <ListContent
                    onPressList={()=>navigate('List')}
                    onPressDetial={(id)=>navigate('ListDetail',{id:id})}
                />

                <View style={styles.more}>
                    <TouchableOpacity onPress={()=>navigate('List')}>
                        <Text>
                            查 看 更 多
                        </Text>
                    </TouchableOpacity>
                </View>
            </ScrollView>
            {/*<Hot/>*/}
        </View>

    );
  }
}


const styles = StyleSheet.create({
    container:{
        flex:1,
        backgroundColor:'#F5F5F5',
    },
    flex:{
        flex:1
    },
    more:{
        height:50,
        alignItems:'center',
        justifyContent:'center',
    }

});

export default HomeScreen;

